<?php
/**
* Delete Real Estate Projects
* @author trungdt
* @since June 25, 2011
*/


if (!defined('EXPONENT')) exit('');

$link = null;
if (isset($_GET['id'])) {
	$link = $db->selectObject('duan','id='.intval($_GET['id']));
	if ($link) {
		$loc = unserialize($link->location_data);
	}
}

if ($link) {
	if (exponent_permissions_check('delete',$loc)) {
		$db->delete('duan','id='.$link->id);
		exponent_flow_redirect();
	} else {
		echo SITE_403_HTML;
	}
} else {
	echo SITE_404_HTML;
}

?>
